import React, { Suspense } from 'react';
import { useRoutes } from 'react-router-dom';
import { static_routes } from './routes';


// 将路由表 转化为 路由组件
const RouterView = () => useRoutes(static_routes);

const Router: React.FC = () => {

  return <Suspense fallback={<div>加载中...</div>}>
    <RouterView></RouterView>
  </Suspense>
}

export default Router